<?php
use think\facade\Route;
//注册路由
Route::post('register','api/zmt/User/register');
//登录
Route::post('login','api/zmt/User/login')->middleware(\api\zmt\middleware\CheckToken::class);
//验证码
Route::post('code','api/zmt/User/sendCode');
//查找个人信息
Route::get('message','api/zmt/User/message');
//个人信息修改
Route::post('msgEditPost','api/zmt/User/msgEditPost');

//图片上传
Route::post('upldImage','api/zmt/Upload/uploadImage');
//导航查询
Route::get('index','api/zmt/Nav/index');
//版纳图查询oa
Route::get('banner','api/zmt/Banner/banner');
//收货地址
Route::group('address',function (){
    //查找收货地址
    Route::get('address','api/zmt/Address/address');
    //添加收货地址
    Route::post('add','api/zmt/Address/add');
    //修改收货地址
    Route::post('edit','api/zmt/Address/edit');
    //删除收货地址
    Route::get('delete','api/zmt/Address/delete');
    //付款充值
    Route::post('charge-money','api/zmt/MoneyLog/add');
})->middleware(\api\zmt\middleware\CheckToken::class);
//商品
Route::group('goods',function (){
    Route::get('index','api/zmt/Goods/index');
    Route::post('add','api/zmt/Goods/add');
    Route::post('edit','api/zmt/Goods/edit');
    Route::get('delete','api/zmt/Goods/delete');
});
//下单
Route::group('order',function (){
    //商品购买
    Route::post('create-order','api/zmt/Order/createOrder');
    //商品支付
    Route::post('walletPay','api/zmt/Pay/walletPay');
    //获取商品信息
    Route::post('getGoodsList','api/zmt/Order/getGoodsList');
    //获取详情
    Route::post('info','api/zmt/Order/info');
    //物流
    Route::post('wuliu','api/zmt/Order/wuliu');
})->middleware(\api\zmt\middleware\CheckToken::class);
